import request from '@/utils/request'

let LiveApi = {

  /*直播列表*/
  getList(data, errorback) {
    return request._postBody('/shop/plus/live/wx/index', data, errorback);
  },

  /*直播列表同步*/
  syn(data, errorback) {
    return request._post('/shop/plus/live/wx/syn', data, errorback);
  },

  /*直播列表*/
  createRoom(data, errorback) {
    return request._postBody('/shop/plus/live/wx/createRoom', data, errorback);
  },

  /*直播列表*/
  toEdit(data, errorback) {
    return request._get('/shop/plus/live/wx/toEdit', data, errorback);
  },

  /*直播列表*/
  editRoom(data, errorback) {
    return request._postBody('/shop/plus/live/wx/editRoom', data, errorback);
  },

  /*直播列表*/
  deleteRoom(data, errorback) {
    return request._post('/shop/plus/live/wx/deleteRoom', data, errorback);
  },

  /*直播列表*/
  importProducts(data, errorback) {
    return request._postBody('/shop/plus/live/wx/importProducts', data, errorback);
  },

  /*置顶设置*/
  settop(data, errorback) {
    return request._post('/shop/plus/live/wx/settop', data, errorback);
  },

  /*直播列表*/
  getProductList(data, errorback) {
    return request._postBody('/shop/plus/live/wx/product/index', data, errorback);
  },

  /*直播列表*/
  toImport(data, errorback) {
    return request._postBody('/shop/plus/live/wx/product/toImport', data, errorback);
  },
  /*直播列表*/
  toOnSale(data, errorback) {
    return request._postBody('/shop/plus/live/wx/product/toOnSale', data, errorback);
  },
  /*直播列表*/
  onSale(data, errorback) {
    return request._postBody('/shop/plus/live/wx/product/onSaleProduct', data, errorback);
  },
  /*直播列表*/
  pushProduct(data, errorback) {
    return request._post('/shop/plus/live/wx/product/pushProduct', data, errorback);
  },

  addProduct(data, errorback) {
    return request._postBody('/shop/plus/live/wx/product/addProduct', data, errorback);
  },

  toEditProduct(data, errorback) {
    return request._get('/shop/plus/live/wx/product/toEdit', data, errorback);
  },

  editProduct(data, errorback) {
    return request._postBody('/shop/plus/live/wx/product/editProduct', data, errorback);
  },

  deleteProduct(data, errorback) {
    return request._post('/shop/plus/live/wx/product/deleteProduct', data, errorback);
  },

  resubmit(data, errorback) {
    return request._post('/shop/plus/live/wx/product/resubmit', data, errorback);
  },

  /*直播列表*/
  pushUrl(data, errorback) {
    return request._post('/shop/plus/live/wx/url', data, errorback);
  },

  /*直播列表*/
  uploadFile(data, errorback) {
    return request._post('/shop/plus/live/wx/uploadFile', data, errorback);
  },
}

export default LiveApi;
